import request from "@/utils/request";

// 业务类型树形列表
export function businessTypeList(data) {
  return request({
    url: "/project/businessType/tree",
    method: "get",
    params: data,
  });
}

// 业务类型列表
export function getbusinessTypeList() {
  return request({
    url: "/project/businessType/businessTypeList",
    method: "get"
  });
}

// 项目转化
export function conversionList(data) {
  return request({
    url: "/system/plan/list",
    method: "get",
    params: data,
  });
}

// 项目列表导出
// export function conversionxExcel(data){
//   return request({
//     url:'/system/plan/export',
//     method:'post',
//     responseType: 'blob',
//     data
//   })
// }

// 所在地区
export function location(data) {
  return request({
    url: "/system/district/list",
    method: "get",
    params: data,
  });
}

// 上传附件
export function attachment(data) {
  return request({
    url: "/common/upload",
    method: "post",
    data,
  });
}

// 编辑成员的展示
export function roleQuery(data) {
  return request({
    url: "/system/user/selects",
    method: "get",
    params: data,
  });
}

// 成员所属部门名称
export function deptNameApi() {
  return request({
    url: "/system/dept/list",
    method: "get",
  });
}

// 删除项目转化
export function deleconversion(planIds) {
  return request({
    url: "/system/plan/delete/" + planIds,
    method: "delete",
  });
}

// 添加项目转化
export function addconversionApi(data) {
  return request({
    url: "/system/plan/add",
    method: "post",
    data,
  });
}

// 修改项目转化
export function updateApi(data) {
  return request({
    url: "/system/plan/update",
    method: "put",
    data,
  });
}

// 计划模板下拉列表
export function PlanTemplatesList(data) {
  return request({
    url: "/system/plan/StencilList",
    method: "get",
    params: data,
  });
}

// 审批人弹窗列表 加权限
export function selectsPeople(data) {
  return request({
    url: "/system/user/findAllUserInfo",
    method: "get",
    params: data,
  });
}


export function selectsPeoples(data) {
  return request({
    url: "/system/user/findAllUserInfoForCheck",
    method: "get",
    params: data,
  });
}




// 查询部门下拉树结构
export function deptTreeSelect() {
  return request({
    url: '/system/user/deptTreeWithoutPremission',
    method: 'get'
  })
}


// 查询用户列表
export function listUser(query) {
  return request({
    url: '/system/user/findAllUserInfo',
    method: 'get',
    params: query
  })
}



// 项目转化详情
export function conversionDetailsList(planId) {
  return request({
    url: "/system/plan/listById/" + planId,
    method: "get",
  });
}

// 具体模板内容
export function PlanTemplatesContent(data) {
  return request({
    url: "/system/plan/getStencilList",
    method: "get",
    params: data,
  });
}

// 行业下拉框
export function industryApi() {
  return request({
    url: "/system/industry/list",
    method: "get",
  });
}

// 撤回
export function withdrawApi(data){
  return request({
    url:"/system/plan/quashPlan",
    method:"post",
    data
  })
}


export function getCategorydicApi(){
  return request({
    url:"/system/catgory/list",
    method:"get"
  });
}

export function getCategorydic2Api(){
  return request({
    url:"/system/catgory/second/list",
    method:"get"
  });
}

export function getbusinessTypeDic(){
  return request({
    url:"/system/catgory/type/list",
    method:"get"
  });
}


